package com.googlecode.moneyManager.config;

import org.springframework.context.annotation.Configuration;


/**
 * Author: Sergiy Doroshenko
 * Date: May 13, 2010
 * Time: 3:20:19 PM
 */
@Deprecated
@Configuration
public class AppConfig {
//    private
//    @Value("#{database.url}")
//    String databaseUrl;

    public AppConfig(){}

//    @Bean
//    public SessionFactory sessionFactory() {
//        AnnotationSessionFactoryBean asFactoryBean = new AnnotationSessionFactoryBean();
//        Class[] classes = {
//                App.class,
//                Percentage.class,
//                Amount.class,
//                Replenish.class,
//                Branch.class,
//                Bank.class,
//                Customer.class,
//                Address.class,
//                Deposit.class,
//                SecurityValue.class
//        };
//        asFactoryBean.setDataSource(dataSource());
//        asFactoryBean.setAnnotatedClasses(classes);
//
//        return asFactoryBean.getObject();
//    }

    
//    @Bean
//    public SecurityValueService securityValueService(){
//        SecurityValueServiceImpl securityValueService  = new SecurityValueServiceImpl();
//        securityValueService.setSecurityValueDAO(securityValueDAO());
//        return securityValueService;
//    }

//    @Bean
//    public SecurityValueDAO securityValueDAO(){
//        SecurityValueDAOHib securityValueDAOHib = new SecurityValueDAOHib();
//        securityValueDAOHib.setSessionFactory(sessionFactory());
//        return securityValueDAOHib;
//    }

//    @Bean
//    public DataSource dataSource() {
//        DriverManagerDataSource ds = new DriverManagerDataSource("jdbc:derby:C:/money-manager/db/moneyManager");
//        ds.setDriverClassName("org.apache.derby.jdbc.EmbeddedDriver");
//        return ds;
//    }
}
